Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing validation when binding memory to buffers with the shader_device_address usage #2031

Merged
merged 8 commits into from
Oct 9, 2022

Conversation

marc0246
Copy link
Contributor

@marc0246 marc0246 commented Oct 8, 2022

Required for #1997.

Adds support for passing the device_address flag when allocating DeviceMemory, which is required when binding memory to a buffer with the shader_device_address usage in the VK_KHR_buffer_device_address extension (and core 1.2 which it was promoted to), but not its predecessor VK_EXT_buffer_device_address. Fixes the bug where UnsafeBuffer::bind_memory wasn't validating if the memory is allocated with the device_address flag, and also fixes the wrong function pointer in BufferAccess::raw_device_address when not using the outdated VK_EXT_buffer_device_address extension.

Changelog:

### Breaking changes
Changes to buffers:
- When binding memory to a buffer with the `shader_device_address` usage, the memory must now have been allocated with the `MemoryAllocateFlags::device_address` flag set.

### Additions
- Added `MemoryAllocateFlags`.

### Bugs fixed
- Fixed missing validation when binding memory to a buffer with the `shader_device_address` usage.

@Rua Rua self-assigned this Oct 9, 2022
vulkano/src/buffer/sys.rs Outdated Show resolved Hide resolved
@marc0246
Copy link
Contributor Author

marc0246 commented Oct 9, 2022

Alright done.

@Rua Rua merged commit 605bf42 into vulkano-rs:master Oct 9, 2022
@marc0246 marc0246 deleted the memory-device-address branch October 9, 2022 11:51
Rua added a commit that referenced this pull request Oct 9, 2022
marc0246 added a commit that referenced this pull request Apr 24, 2023
hakolao pushed a commit to hakolao/vulkano that referenced this pull request Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants